package edu.xjnu.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import edu.xjnu.mapper.MusicMapper;
import edu.xjnu.uitls.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author David
 * @since 2023-03-18
 */
@RestController
@RequestMapping("/music-entity")
@Api(tags = "专辑控制器")
public class MusicController {
    @Resource
    private MusicMapper mapper;

    @ResponseBody
    @ApiOperation(value = "查询所有专辑信息")
    @GetMapping("/selectList")
    public Result selectList() {
        return Result.success(mapper.selectList(new QueryWrapper<>()));
    }
}
